﻿


using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MMMaze
{
    public partial class MazeControl : UserControl
    {
        public MazeControl()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(MazeControl_Loaded);
            //this. += new KeyEventHandler(MazeControl_KeyDown);
        }

 
 
     public   PanelMatrix PM;


        void MazeControl_Loaded(object sender, RoutedEventArgs e)
        {
            var x = new TestRoomMatrix3DInt();
            var x1 = x.CreateRoomMatrix3D();
            



            PM = new PanelMatrix(
                           5,
                           2,
                           0,
                           0,
                           -this.Width,
                          this.Width,
                                  this.Height,
                           () => new StackPanel(),
                           (p) =>
                           {
                               var b = new Button() { VerticalAlignment = VerticalAlignment.Stretch, Height = this.Height };
                             //  p.Children.Add(b);
                               var OpColor= Color.FromArgb(255, 255,255, 255);
                               p.Background = new System.Windows.Media.SolidColorBrush(OpColor);
           
                               

                             
                               return p;
                           });

            //foreach (var x in PM.Layers)
            //{
            //    x.CenterWall.CorePanel .Visibility = Visibility.Collapsed;
            //    x.LeftBladePanels[0].CorePanel.Visibility = Visibility.Collapsed;
            //}



            PM.AddTo(this.LayoutRoot );
        }


        public void MoveR()
        { 
        
        }

        public void MoveL()
        {

        }

        public void MoveF()
        {

        }

        public void MoveB()
        {

        }

        public void MoveRT()
        {

        }

        public void MoveLT()
        {

        }

    }


}
